import { ApiProperty } from '@nestjs/swagger';
import { IsNotEmpty, IsNumber, IsString } from 'class-validator';

export class CreateCarDto {
  @IsNotEmpty()
  @ApiProperty({ description: '车牌号' })
  @IsString()
  license_plate: string;

  @ApiProperty({ description: '车辆的品牌' })
  @IsString()
  @IsNotEmpty()
  brand: string;

  @ApiProperty({ description: '车辆型号' })
  @IsNotEmpty()
  @IsString()
  shape: string;

  @ApiProperty({ description: '车辆颜色' })
  @IsNotEmpty()
  @IsString()
  color: string;

  @ApiProperty({ description: '车辆排量' })
  @IsNotEmpty()
  @IsString()
  displacement: string;

  @ApiProperty({ description: '车辆状态，0 运行中，1待修， 2已修好' })
  @IsNotEmpty()
  @IsString()
  status: string;

  //   车辆的拥有者
  @ApiProperty({ description: '车辆拥有者' })
  @IsNotEmpty()
  @IsNumber()
  userId: number;
}
